import request from "@/utils/request";

/**
 * 获取企业基本信息
 */
export function getCompaynInfo(id) {
  return request({
    url: "/basic-api/company/comCompany/comGetInfo/" + id,
    method: "GET",
  });
}

/**
 * 编辑企业基本信息
 */
export function editCompanyInfo(data) {
  return request({
    url: "/basic-api/company/comCompany/comEdit",
    method: "PUT",
    data,
  });
}

/**
 * 签署信用承诺书
 */
export function signAgreement(data) {
  return request({
    url: "/basic-api/company/comCompany/signAgreement",
    method: "PUT",
    data,
  });
}

/**
 * 获取企业一览表
 */
export function getCompanyList(data) {
  return request({
    url: "/basic-api/company/comCompany/comList",
    method: "GET",
    params: data,
  });
}

/**
 * 企业前端-获取企业基本信息
 */
export function getClientUseCompanyList(data) {
  return request({
    // url: '/basic-api/company/comCompany/api/v1/company/list',
    // url: '/basic-api/company/comCompany/clientList',
    url: "/basic-api/company/noAuth/companyList",
    method: "GET",
    params: data,
  });
}

/**
 * 企业前端-获取企业基本信息
 */
export function getClientUseCompanyInfo(id) {
  return request({
    // url: '/basic-api/company/comCompany/api/v1/company/list',
    // url: '/basic-api/company/comCompany/clientList',
    url: "/basic-api/company/noAuth/company/" + id,
    method: "GET",
  });
}

/**
 * 企业前端-获取企业变更记录
 */
export function getClientUseCompanyChange(data) {
  return request({
    url: "/basic-api/company/noAuth/comHistorylist",
    method: "GET",
    params: data,
  });
}

/**
 * 企业前端-获取知识产权
 */
export function getIntellectualList(data) {
  return request({
    url: "/basic-api/company/noAuth/comIntellectualList",
    method: "GET",
    params: data,
  });
}

/**
 * 企业前端-获取企业画像
 */
export function getCompanyPortrait(id) {
  return request({
    url: "/basic-api/company/noAuth/portrait/" + id,
    method: "GET",
  });
}

/**
 * 企业前端-获取企业优化数据
 */
export function getCompanyOptimize(id) {
  return request({
    url: "/basic-api/company/noAuth/optimize/" + id,
    method: "GET",
  });
}

/**
 * 企业前端-获取统计数据
 */
export function getStatistics() {
  return request({
    url: "/basic-api/company/noAuth/statistics",
    method: "GET",
  });
}
